package model

// 宾果竞猜数据
type BgGuess struct {
	Id       int `json:"id" form:"id" gorm:"primary key;AUTO_INCREMENT"`
	UserId   int `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id;type:varchar(15);"`
	AnswerId int `json:"answer_id" form:"answer_id" gorm:"column:answer_id;comment:答案id;"`
}

type BgGuessNum struct {
	GuessId       int     `json:"guess_id" form:"guess_id" gorm:"primary key;column:guess_id"`
	PlayingMethod int     `json:"playing_method" form:"playing_method" gorm:"column:playing_method;comment:玩法"`
	Num           string  `json:"num" form:"num" gorm:"column:num"`
	Integral      float64 `json:"integral" form:"integral" gorm:"column:integral;comment:积分"`
	IsWin         int     `json:"is_win" form:"is_win" gorm:"column:is_win;comment:是否胜利,0失败，1胜利，2平局"`
	Time          int     `json:"time"  form:"time" gorm:"time;comment:时间"`
}

// TableName BgGuess 表名
func (BgGuess) TableName() string {
	return "bg_guess"
}

// TableName BgGuessNum 表名
func (BgGuessNum) TableName() string {
	return "bg_guess_num"
}
